#ifndef ENTITYEDITOR_H
#define ENTITYEDITOR_H

#include <head/g_pch.h>
#include "additem.h"

namespace Ui {
class EntityEditor;
}

class EntityEditor : public QDialog
{
    Q_OBJECT

public:
    explicit EntityEditor(QWidget *parent = nullptr);
    ~EntityEditor();

    void addItem(const QString &key,const QString &value);

private slots:
    void on_btn_load_clicked();

    void on_btn_create_clicked();

    void on_btn_add_clicked();

    void on_btn_remove_clicked();

    void on_btn_save_clicked();

    void on_listView_doubleClicked(const QModelIndex &index);

    void on_btn_edit_clicked();

private:
    Ui::EntityEditor *ui;

    QStringListModel *model;
    Entity entity;
    QString fileName;
};

#endif // ENTITYEDITOR_H
